<?php
class Dijkstra_Link{
	
	private $nodeA;
	private $nodeB;
	
	public function Dijkstra_Link(Dijkstra_Node $nodeA, Dijkstra_Node $nodeB){
		$this->nodeA = $nodeA;
		$this->nodeB = $nodeB;
	}
	
	public function getName(){
		return $this->nodeA->getName() . " - " . $this->nodeB->getName();
	}
	
	public function getWeight(){
		return 1;
	}
	
	public function getNodeA(){
		return $this->nodeA;
	}
	
	public function getNodeB(){
		return $this->nodeB;
	}
	
	public function __toString(){
		return "{$this->nodeA->getName()}-({$this->getWeight()}-{$this->nodeB->getName()}";
	}
}